package com.example.apigateway;

import com.example.apicommon.model.entity.User;
import com.example.apicommon.service.InnerUserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,
        DataSourceTransactionManagerAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class})
@EnableDubbo
public class ApiGatewayApplication {
//    @DubboReference
//    InnerUserService innerUserService;

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ApiGatewayApplication.class, args);
//        ApiGatewayApplication application = context.getBean(ApiGatewayApplication.class);
//        User wsc = application.get("qweq");
//        System.out.println("result: " + wsc);

    }
//
//    public User get(String key){
//        return innerUserService.getInvokeUser(key);
//    }

}
